package com.tbh.annotation.jsr250;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Jsr250Main {
    public static void main(String[] args) {
        AbstractApplicationContext abstractApplicationContext = new ClassPathXmlApplicationContext("Beans.xml");
        HelloWorld helloWorld = (HelloWorld) abstractApplicationContext.getBean("helloWorld");
        helloWorld.getMessage();

        // 调用销毁
        abstractApplicationContext.registerShutdownHook();

    }
}
